package com.ctshk.rpc.airexpress.mapper;

import com.ctshk.rpc.airexpress.base.CustomBaseMapper;
import com.ctshk.rpc.airexpress.dto.app.self.platform.AirportExpressChannelSelfPlatformRuleDTO;
import com.ctshk.rpc.airexpress.entity.AirportExpressChannelOnlineSelfPlatform;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 机场快线--线上渠道自定义权限 Mapper 接口
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-02-05
 */
public interface AirportExpressChannelOnlineSelfPlatformMapper extends CustomBaseMapper<AirportExpressChannelOnlineSelfPlatform> {
    @Select({"<script>",
            " SELECT * ",
            " FROM t_airport_express_channel_online_self_platform aecosp LEFT JOIN t_airport_express_increase_strategy_rule aeisr ON aecosp.id = aeisr.custom_id ",
            " where aecosp.is_deleted = 0",
            " and aecosp.increase_strategy_id in <foreach collection='strategyIds' item='item' open='(' close=')' separator=','>",
            "#{item}",
            "</foreach>",
            "</script>"})
    List<AirportExpressChannelSelfPlatformRuleDTO> selectByStrategyIds(@Param("strategyIds") List<Long> strategyIds);

}
